import {
	defineStore
} from 'pinia';
const useUserStore = defineStore('user', {
	state: () => ({
		token: "", //token
		ptm: "",
		auth: {},
		userInfo: {
			id: "", //用户id
			avatar: "",
			username: "",
			roleId: "",
			roleName: "",
			deptName: "",
			logintime: "",
			loginip: "",
			mobile: "",
			companyName: "", //公司名称
			companyLogo: "", //企业logo
		}, //用户信息
	}),
	actions: {
		setToken (data) {
			this.token = data;
		},
		setUserInfo (data) {
			this.userInfo = data;
		},
		setAuth (data) {
			this.auth = data;
		},
		setPtm (data) {
			this.ptm = data;
		}
	}
})
export default useUserStore